<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://java.sun.com/jsf/core">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Insert title here</title>
</head>

<body>
	<h:panelGrid border="2" columns="2">
		<p:facet name="header">
			<h:outputText value="Enter your search Constraints"></h:outputText>
		</p:facet>
		<h:outputLabel value="Name"></h:outputLabel>
		<h:inputText value="#{studentBean.name}"></h:inputText>
		<h:outputLabel value="Surname"></h:outputLabel>
		<h:inputText value="#{studentBean.surname}"></h:inputText>
		<h:outputLabel value="Univesity"></h:outputLabel>
		<h:selectOneListbox id="lbUniversity"
			value="#{studentBean.university}">
			<p:selectItem itemValue="Ege University"></p:selectItem>
			<p:selectItem itemValue="METU"></p:selectItem>
			<p:selectItem itemValue="ITU"></p:selectItem>
			<p:selectItem itemValue="Hacettepe University"></p:selectItem>
			<p:selectItem itemValue="Bilkent University"></p:selectItem>
		</h:selectOneListbox>
		<h:outputLabel value="Department"></h:outputLabel>
		<h:selectOneListbox id="lbDepartment"
			value="#{studentBean.department}">
			<p:selectItem itemValue="Computer Engineering"></p:selectItem>
			<p:selectItem itemValue="Industrial Design"></p:selectItem>
			<p:selectItem itemValue="Interior Design"></p:selectItem>
			<p:selectItem itemValue="Graphic Design"></p:selectItem>
			<p:selectItem itemValue="Architecture"></p:selectItem>
		</h:selectOneListbox>
		<h:outputLabel value="Gender" id="lblGender"></h:outputLabel>
		<h:selectOneRadio id="rbGender" value="#{studentBean.gender}">
			<p:selectItem itemValue="Male" itemLabel="Male"></p:selectItem>
			<p:selectItem itemValue="Female" itemLabel="Female"></p:selectItem>
		</h:selectOneRadio>
		<h:outputLabel value="GPA" id="lblGPA"></h:outputLabel>
		<h:inputText id="txtGPA" value="#{studentBean.gpa}"></h:inputText>
		<h:outputLabel value="E-mail"></h:outputLabel>
		<h:inputText value="#{studentBean.email}"></h:inputText>
		<h:commandButton id="btnSearch" value="Search"
			action="#{studentBean.setNewStudent}"></h:commandButton>
	</h:panelGrid>
	<p:subview>
		<h:dataTable border="1" binding="">
			<p:facet name="header">
				<h:outputText value="Your Search Results"></h:outputText>
			</p:facet>
			<h:column id="column1">
				<p:facet name="header">
					<h:outputText value="Name"></h:outputText>
				</p:facet>
			</h:column>
			<h:column id="column2">
				<p:facet name="header">
					<h:outputText value="Surname"></h:outputText>
				</p:facet>
			</h:column>
			<h:column id="column3">
				<p:facet name="header">
					<h:outputText value="Surname"></h:outputText>
				</p:facet>
			</h:column>
			<h:column id="column4">
				<p:facet name="header">
					<h:outputText value="University"></h:outputText>
				</p:facet>
			</h:column>
			<h:column id="column5">
				<p:facet name="header">
					<h:outputText value="Department"></h:outputText>
				</p:facet>
			</h:column>
			<h:column id="column6">
				<p:facet name="header">
					<h:outputText value="Gender"></h:outputText>
				</p:facet>
			</h:column>
			<h:column id="column7">
				<p:facet name="header">
					<h:outputText value="Email"></h:outputText>
				</p:facet>
			</h:column>
						<h:column id="column8">
				<p:facet name="header">
					<h:outputText value="GPA"></h:outputText>
				</p:facet>
			</h:column>

		</h:dataTable>
	</p:subview>
</body>

</html>